import request from "../../../utils/request";

enum API {
  getRoleList = "/admin/acl/role/",
  addRole = "/admin/acl/role/save",
  updateRole = "/admin/acl/role/update",
  delRole = "/admin/acl/role/remove/",
}

export const reqGetRoleList = (page: number, limit: number, param?: any) =>
  request.get(API.getRoleList + `${page}/${limit}`, { params: param });

export const reqAddRole = (roleInfo: any) =>
  request.post(API.addRole, roleInfo);
export const reqUpdateRole = (roleInfo: any) =>
  request.put(API.updateRole, roleInfo);

export const reqDelRole = (id: number) => request.delete(API.delRole + id);
